import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "@/core/services/store";
import Axios from 'axios';
import ElementUI from 'element-ui'
import "./assets/theme/index.css";
import "./assets/theme/fonts/element-icons.ttf"
import "./assets/theme/fonts/element-icons.woff"

Vue.config.productionTip = false;
Vue.prototype.$axios = Axios
Vue.use(ElementUI)

// Global 3rd party plugins
import "popper.js";
import "tooltip.js";
import PerfectScrollbar from "perfect-scrollbar";
window.PerfectScrollbar = PerfectScrollbar;
import ClipboardJS from "clipboard";
window.ClipboardJS = ClipboardJS;

// Vue 3rd party plugins
import "@/core/plugins/portal-vue";
import "@/core/plugins/bootstrap-vue";
import "@/core/plugins/perfect-scrollbar";
import "@/core/plugins/highlight-js";
import "@/core/plugins/inline-svg";
import "@/core/plugins/apexcharts";
import "@/core/plugins/treeselect";
import "@/core/plugins/metronic";
import "@mdi/font/css/materialdesignicons.css";

Axios.interceptors.response.use(function (response) {
  switch (response.status) {
    case 200:
      return response.data;
  }

});






// Remove this to disable mock API
router.beforeEach((to, from, next) => {
  window.scrollTo(0, 0);

  setTimeout(() => {
    next()

  }, 100);
});

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
